Control of a microphone

ABSTRACT

A microphone circuit has a clip detection circuit ( 30 ) which detects when an analogue to digital converter (ADC,  12 ) output has reached a threshold. A variable capacitance ( 34   a,    34   b,    34   c,    34   d ), which functions as a variable input load associated with the microphone ( 11 ), is controlled based on the clip detection circuit output, the feedback is thus based on the ADC out-put level, and the processing of this signal can be implemented without requiring baseband processing of the signal—it can simply be based on a state of the ADC output.

This invention relates to the control of a microphone.

Loudspeakers and microphones essentially comprise a movable diaphragm orother member which provides conversion between a sound pressure wave andan electrical signal.

It is well known that the output of a loudspeaker should be controlledin such a way that it is not simply driven by an input signal. Forexample, an important cause of loudspeaker failures is a mechanicaldefect that arises when the loudspeaker diaphragm is displaced beyond acertain limit, which is usually supplied by the manufacturer. Goingbeyond this displacement limit either damages the loudspeakerimmediately, or can considerably reduce its expected life-time.

There exist several methods to limit the displacement of the diaphragmof a loudspeaker, for example by processing the input signal withvariable cut-off filters (high-pass or other), the characteristics ofwhich are controlled via a feedforward or feedback control loop.

A similar issue arises in connection with microphones. Microphones aremoving from typical analogy microphones to digital microphones modules.These microphone modules typically consist of a sensor manufactured in amicro-electro-mechanical system (MEMS) process and an analogy to digitalconverter (ADC). The output of the ADC (typically a sigma delta typeconverter) is a PDM (pulse density modulation) stream that outputs thedata to a baseband processor.

Normal acoustical levels are at about 94 dBSPL (1 pA of sound pressure).The voltage from the microphone sensor is 5 mV @ 94 dBSPL. A requiredsignal to noise ratio for the module is typically 61 dB. This means 64dB for the sensor and 64 dB for the ADC. The equivalent noise level atthe ADC input is 3 uV.

The output voltage of the microphone sensor can be as high as 100 mV,which corresponds to 120 dBSPL. The dynamic range of the ADC then needsto be 90 dB.

For recordings made during rock concerts, very high sound pressure closeto the concert speakers overloads the module. As result, the recordingsounds distorted when listing afterwards. The MEMS sensor itself iscapable of handling sound pressures up to 140 dBSPL before mechanicaldamage is likely to occur. However, the ADC cannot provide the requiredsignal to noise ratio and is therefore the weakest link.

When there is background noise, particularly wind noise, high soundpressures levels can occur. This wind noise will also cause clipping ofthe ADC. Removing the noise afterwards in a noise canceller cannot beachieved without distortion, since the signals are distorted and nonlinear.

This invention is directed to this problem of overloading (clipping) ofthe ADC.

According to the invention, there is provided a microphone circuit asclaimed in claim 1.

The invention enables an extension of the maximum sound pressure byproviding variable attenuation based on clipping of the ADC. Earlydetection of clipping is possible such that fast attack can occur.

The variable attenuator comprises a variable input load, used to reducethe input signal until the ADC does not clip anymore.

The variable input load comprises a variable capacitance. This variablecapacitance can then be in series with the capacitance of the microphoneitself, so that a variable capacitor divider circuit is formed.

The variable capacitance can comprise an array of capacitors in parallelbetween the microphone output and a control terminal, wherein thecapacitors of the array are individually switchable into or out of theparallel circuit. For example, the variable capacitance can comprise abinary weighted array of capacitors.

The control circuit can comprise a counter, which is controlled toincrease in response to one of a clip-detection signal and ano-clip-detection signal, and to decrease in response to the other ofthe clip-detection signal and the no-clip-detection signal. Thus, whenthere is clipping, indicating that the ADC has reached its limit and theinput sound pressure means that signal attenuation is required, acounter is changed, such that the capacitor network configuration isaltered. Only when the clipping has stopped does the capacitor networkconfiguration return to its previous state. This provides a simplecontrol scheme.

The analogue to digital converter can comprise a 1 bit sigma deltaconverter with a pulse density modulation output. Clip detection canthen be based on the pulse density modulation signal reaching athreshold. The threshold can for example comprise a given proportion of1s in a given length bit stream.

The invention also provides a method of processing a microphone outputsignal, as claimed in claim 7.

An example of the invention will now be described in detail withreference to the accompanying drawings, in which:

FIG. 1 shows a first known microphone circuit

FIG. 2 shows a first known microphone circuit

FIG. 3 shows an example of microphone circuit of the invention; and

FIG. 4 is used to explain the control scheme employed in the circuit ofFIG. 3.

The invention relates to a method of extending the dynamic range of theADC in a microphone circuit.

There are several known ways to extend to dynamic range.

A first example is shown in FIG. 1. A programmable gain amplifier (PGA)10 (programmable from 0 to 20 dB attenuation in e.g. 1 dB steps) isprovided at the input of the ADC 12. The programmable amplifierprocesses the signal of the microphone 11 amplified by an amplifier 13.A baseband (BB) processor 14 or other sub system implements the control,and the PGA 10 is set to the appropriate amplification level. A drawbackis that the BB processor 14 determines the attack time and is slow.Also, the gain of the PGA (1 dB steps) needs to be compensated otherwiseclicks can be audible during switching of the PGA.

In order to overcome the click issue it is also possible to provide twoADCs. A twin ADC arrangement is shown in FIG. 2. The standard ADC 12 ahandles 100 mV rms. The second ADC 12 b handles 1 Vrms (20 dB more). Thetwo paths have a different gain. Thus, there are two data streams (forexample PDM streams) coupled to the BB processor 14. The BB processorneeds to perform some post processing to combine the two streams intoone undistorted signal. Switching over from one stream to the otherstream can be very fast and is implemented inside the BB processor. Careneeds to be taken in matching the 2 streams.

Each of the two ADCs has a control circuit in the form of a voltagereference source 22 a,22 b for setting the voltage on one input of thedifferential ADC converters, and a high impedance element 24 a,24 bbetween the ADC input terminals. In the example shown, this comprisestwo back to back diodes. These do no conduct, as the input voltage fromthe microphone is of the order of 100 mV and therefore below theconduction threshold of the diodes. They could be replaced by adifferent high impedance element. Each ADC circuit has a constant gain.

The different gains for the two paths are implemented by the capacitors28 a,28 b which define a capacitor divider network with the capacitanceof the microphone.

Compression/decompression systems can also be used. The microphonemodule then compresses the signal such that it fits the dynamic range ofthe ADC. In the BB processor, the inverse function is needed anddecompresses the signal to regenerate an undistorted audio signal.

The disadvantage of these solutions is that the BB processor needs toimplement the dynamic range extension of the microphone module. In allcases, the incoming signal needs to be amplified or attenuated.

This means that specialised control algorithms are required in thebaseband controller. Because the control takes place outside themicrophone module, a time lag can result in making the requiredadaptation to the microphone circuit characteristics. The BB processorwill also need to have an extended dynamic range corresponding to theextending dynamic range of the microphone circuit.

The invention is based on an approach in which the microphone moduleitself implements the setting of the microphone gain.

The invention provides a microphone circuit in which a clip detectioncircuit detects when the analogue to digital converter output hasreached a threshold. A variable attenuator, preferably in the form of avariable input load associated with the microphone, is controlled basedon the clip detection circuit output. The feedback is thus based on theADC output level, and the processing of this signal can be implementedwithout requiring baseband processing of the signal—it can simply bebased on a state of the ADC output. As a result, the feedback path canbe implemented within the microphone module and before the basebandprocessing. Thus, the detected signal used to provide feedback controlis directly at the output of the ADC.

Since the sample frequency is high, the delay before a clip event isdetected is very low. As such the attack time can be fast.

An amplification or attenuation is required, as in the systems describedabove. The microphone can be considered to have the electricalcharacteristics of a capacitor. The effective value is in the range of 3pF. In one preferred implementation of the invention, the signal comingfrom the microphone sensor is attenuated by loaded with a (programmable)capacitor.

FIG. 3 shows an example of microphone circuit of the invention.

The ADCs are drive in the same way as explained with reference to FIG.2, with a voltage reference source and a high impedance between thereference input and the microphone analogue input.

The output of the ADC 12 is provided to a clip detection circuit 30. Byclipping is meant that the digital output has reached a threshold suchthat the ADC is at the limit of its preferred range of operation. Thisclipping can be at or near the maximum digital output of the ADC.However, the signal to noise ratio of the ADC can drop before thismaximum value is reached, and the threshold can thus be set lower, forexample at 70-90% of the maximum digital output.

The clip detection is used to cause attenuation of the microphonesignal. An attenuation control unit 32 generates the required controlsignal.

The attenuation can be implemented in many different ways, including aprogrammable amplifier as shown in FIG. 1, but controlled directly bythe output of the ADC 12. However, in a preferred implementation asshown in FIG. 3, a variable input load is provided. This is implementedin FIG. 3 as a binary weighted capacitive attenuator, comprising anarray of capacitor-switch units 34 a, 34 b, 34 c, 34 d.

The array of capacitors is in parallel between the output of themicrophone 11 and a control terminal (ground). The capacitors of thearray are individually switchable into or out of the parallel circuit bythe associated switches.

If a maximum attenuation of 20 dB needs to be achieved, the totalcapacitance needs a value which is about 10 times higher than themicrophone capacitance. In the example of a 3 pF microphone, a maximumcapacitance of 30 pF is required. Using a binary weighted function, thecapacitors can be set at approximately 16 pF, 8 pF, 4 pF, 2 pF, 1 pF,0.5 pF, 0.25 pF, 0.125 pF for an 8 bit attenuator. When all capacitorsare switched on, the attenuation is maximum.

FIG. 4 shows the attenuation as a function of code for the 8 bit controlsystem outlined above.

The attenuator control can be implemented by means of an up/downcounter. In one example, code 0 can signify no attenuation and code 255signifies maximum attenuation.

As long as the clip detect is active, the counter counts up. This isdone in a fast way (attack) and the speed can be programmable. Aprogrammable increment value of 0.04, 0.08 or 0.16 can be used by way ofexample.

When no clip is detected, the counter counts slowly down, withprogrammable decrement value of 0.04e-3, 0.08e-3 or 0.16e-3 by way ofexample, i.e. a factor of 1000 slower than the response to the clipdetect signal. However, the counter is running on the same clock as theADC, so it counts very fast. The counter can be implemented as a realup/down counter, or implemented as a form of integrator.

The clip detector has as input the ADC output. The type of ADC istypically a 1 bit sigma delta converter. The output is a PDM stream of 1bit data. The pulse density for a given stream length ranges from 0%(all ‘0’) up to 100% (all ‘1’). The ratio between actual number of ‘1’compared to the maximum number of ‘1’ in a certain time frame of thedata stream functions as threshold and determines the actual value ofthe input signal. For example, for a data stream of 10 bits, if 3logical ‘1’ values are received from the ADC, it means that a value of30% of the maximum is coded.

The maximum undistorted output level of a 1 bit sigma delta ADC is inthe range of 70%-80%, so that a clip detector can be based on countingthe ‘1’s in a stream of 10 bits with a threshold of 8 ‘1’ values (80% ofthe maximum output). The clip detect signal then becomes active and asresult the attenuator control reduces the input signal of the ADC. Sincethe clip detect acts on the ADC output and by examining 10 bits, a clipdetect can be found within 10 clock cycles of the ADC. A typical clockfrequency is in the range of 3 MHz. This results in a detection time ofabout 3 us (10×1/f).

This invention can be used in a digital microphone module, whereincreased dynamic range is needed to handle high load events, forexample that exceed 120 dBSPL. The baseband processor does not requirethis extended dynamic range and as such a standard baseband processorcan be used without modification.

If an extended dynamic range is needed inside the baseband processor orif a constant gain is needed (as in an acoustic echo canceller); theinverse function implemented by the attenuator can be implemented withinthe baseband processor. This can be implemented without requiringcomplicated feedback or feedforward paths, because the clip detectfunction is based on the PDM stream, which is available in both themicrophone module as well as in the baseband processor.

The invention has been described with reference to a one bit sigma deltaconverter. However, the ADC clipping detection can be implemented withother converters, such as multi-bit sigma delta, mash and nyquist ADCs.

The static gain control has been shown based on a differential ADC witha reference voltage to one input. However, other control or biasingschemes can be combined with the attenuation control of the invention.

The capacitor array can be replaced with a different variable load, forexample not a purely capacitive load, as long as the result is that themicrophone signal is attenuated before being processed by the analogueto digital converter.

The values of capacitances above are only by way of example, and theinvention can be applied to different microphone designs. The concept ofthe invention is the use of the digital level of the analogy to digitalconverter as a parameter which controls an attenuation function of themicrophone electrical output signal.

Various modifications will be apparent to those skilled in the art.

1. A microphone circuit comprising: a microphone; an analogue to digitalconverter at an output of the microphone; a clip detection circuit fordetecting when the analogue to digital converter output has reached athreshold, the clip detection circuit having an output; a variablecapacitance which functions as a variable input load associated with themicrophone; and a control circuit for controlling the variablecapacitance based on the clip detection circuit output.
 2. A circuit asclaimed in claim 1, wherein the variable capacitance comprises an arrayof capacitors in parallel between the microphone output and a controlterminal, wherein the capacitors of the array are individuallyswitchable into or out of the parallel circuit.
 3. A circuit as claimedin claim 2, wherein the variable capacitance comprises a binary weightedarray of capacitors.
 4. A circuit as claimed in claim 1, wherein thecontrol circuit comprises a counter, which is controlled to increase thecount in response to one of a clip-detection signal and ano-clip-detection signal, and to decrease the count in response to theother of the clip-detection signal and the no-clip-detection signal. 5.A circuit as claimed in claim 1, wherein the analogue to digitalconverter comprises a 1 bit sigma delta converter with a pulse densitymodulation output.
 6. A circuit as claimed in claim 5, wherein clipdetection is based on the pulse density modulation signal reaching athreshold.
 7. A method of processing a microphone output signal,comprising: converting the microphone output signal to digital using ananalogue to digital converter; implementing clip detection by detectingwhen the analogue to digital converter output has reached a threshold;and controlling a variable capacitance which functions as a variableinput load associated with the microphone based on the clip detection.8. A method as claimed in claim 7, wherein the variable capacitancecomprises an array of parallel capacitors and controlling the variableinput load comprises individually switching capacitors of the array intoor out of circuit.
 9. A method as claimed in claim 7, wherein thecontrolling comprises operating a counter, which is controlled toincrease the count in response to one of a clip-detection signal and ano-clip-detection signal, and to decrease the count in response to theother of the clip-detection signal and the no-clip-detection signal. 10.A method as claimed claim 7, wherein the converting comprises using a 1bit sigma delta converter with a pulse density modulation output.
 11. Amethod as claimed in claim 10, wherein clip detection is based on thepulse density modulation signal reaching a threshold.